package com.baiqian.doupo.douji;

import com.baiqian.doupo.capability.douqi.IDouQiCapability;
import com.baiqian.doupo.tileentity.HuoDingTileEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;

public class DouJi_LingHunZhuRu extends DouJi{
    public DouJi_LingHunZhuRu(){
        super("灵魂注入", 6,4,3,-1,1*20,
                0,0.0,0.0,0.0,2,4,false,false);
    }

    @Override
    public void useEx(IDouQiCapability l, PlayerEntity entity) {
        RayTraceResult ray_trace_result= entity.pick(3,0,false);
        TileEntity tile_entity =  entity.world.getTileEntity(new BlockPos(ray_trace_result.getHitVec()));
        if(tile_entity instanceof HuoDingTileEntity){
            ((HuoDingTileEntity) tile_entity).addMakingPoint(1);
        }
    }

    @Override
    public void addEffect(LivingEntity entity) {

    }

    @Override
    protected void createEntity(IDouQiCapability l,PlayerEntity playerEntity) {}
}
